from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time

browser = webdriver.Chrome()
# 1.3访问界面
# 访问百度首页
browser.get('https://www.baidu.com/')
time.sleep(2)
# # 打开哔哩哔哩
browser.get('https://www.bilibili.com/')
time.sleep(2)
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
el=driver.find_element('id','kw')
el.send_keys('666')
time.sleep(100)
driver.close()

# 后退到百度页面
browser.back()
time.sleep(2)
# 前进到bilibili页面
browser.forward()
time.sleep(2)


